<?php

class Pages_Form_Geocoord extends Zend_Form {

	public function init() {
		$this->setMethod('post');
		
		$name = $this->createElement('text', 'name');
		$name->setLabel(_('Name of the object:'));
		$name->setAttrib('size', '32');
		$name->setAttrib('maxlength', '255');
		$name->setRequired(true);
		
		$coord = $this->createElement('text', 'coord');
		$coord->setLabel(_('Position of the object:'));
		$coord->setRequired(true);
		$coord->addPrefixPath ( 'Nimblecms_Form_Decorator', 'Nimblecms/Form/Decorator', 'decorator' );
		$coord->addDecorator('Yandexmap');
		$coord->setValue('60.583333343333,56.833333343333');
		
		$submit = $this->createElement('submit', 'submit');
		$submit->setLabel(_('Submit'));
		
		$this->addElements(array($name, $coord, $submit));
	}
}
